﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExtAspNet;
using Manager;
using Model;
using System.Data;
namespace HealthSystem
{
    public partial class SubAdmin : BasePage
    {
        HW_Manger_Admin_UserManager manager = new HW_Manger_Admin_UserManager();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindGrid();
            }
        }
        public void BindGrid()
        {
            try
            {
                string DistrictId = Request["pid"];
                //权限检验
                int count = 0;
                DataTable list = manager.GetSubAdmin(Gird1.PageIndex,Gird1.PageSize,out count, DistrictId);
                Gird1.RecordCount = count;
                this.Gird1.DataSource = list;
                this.Gird1.DataBind();
            }
            catch
            {
                Alert.Show("系统错误");
            }
        }
        public void Window1_Close(object sender, EventArgs e)
        {

        }
        public void PageIndexChange(object sender, ExtAspNet.GridPageEventArgs e)
        {
            Gird1.PageIndex = e.NewPageIndex;
            BindGrid();
        }
    }
}